package com.cloud.mapper;


import com.cloud.entity.UserEntity;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface UserMapper {
    @Select("select * from users")
    List<UserEntity> getByUsers();

    @Insert("insert into users(name) values(#{userEntity.name})")
    void add(@Param("userEntity") UserEntity userEntity);

    @Select("select * from users")
    List<UserEntity> getList();

    @Update("update users set name =#{name} where id =1")
    void updateData(@Param("name") String name);
}